}
// Iterate through waypoints in both tracks simultaneously
QUEUE_FOR_EACH(&gnss_track->waypoint_list, elem, tmp) {
- Waypoint* wpt = (Waypoint*) elem;
- double pres_alt = interpolate_alt(pres_track, wpt->GetCreationTime().toTime_t() + time_adj);
- wr_fix_record(wpt, (int) pres_alt, (int) wpt->altitude);
+ // FIXME(NEW_Q): the excessive casting of the iterators is gross. Rethink.
+ double pres_alt = interpolate_alt(pres_track, ((Waypoint*) elem)->GetCreationTime().toTime_t() + time_adj);
+ wr_fix_record(((Waypoint*) elem), (int) pres_alt, (int) ((Waypoint*)elem)->altitude);
}
} else {
if (pres_track) {
queue* elem, *tmp;
QUEUE_FOR_EACH(whichQueue, elem, tmp) {
- Waypoint* waypointp = (Waypoint*) elem;
+ void* vwaypointp = static_cast<void*>(elem);
+ Waypoint* waypointp = static_cast<Waypoint*>(vwaypointp);
if (waypointp->shortname == name) {
return waypointp;
}
{
QString rname;
- Waypoint* testwpt;
-
/* total nodes (waypoints) this route */
if (rte->waypoint_list.next) {
// this test doesn't do what I w ant i.e test if this is a valid